<?php
//创建订单
require_once 'access_token.php';


$res = post('https://open.douyin.com/api/apps/trade/v2/order/create_order', [
    "sku_list" => [
        [
            "quantity" => 2,   //下单SKU数量
            "sku_id" => "7128346098909300749",  //商品sku_id
            "sku_id_type" => 1,//商品库sku
            "discount_amount" => 0, //优惠金额
            "goods_info" => [
                "date_rule" => "周一至周日可用",
                "goods_id" => "7128346098909300749",//商品id
                "goods_id_type" => 1 //商品id类别，poi商品传 1，非poi商品传 2
            ]
        ]
    ],
    "total_amount" => 480,
    "discount_amount" => 0,
    "phone_num" => "31",
    "contact_name" => "且题化话",
    "extra" => "nisi sit",
    "open_id" => "xxxxxxx",
    "out_order_no" => "27753r4e5rrr7fer43",
    "order_entry_schema" => [
        "path" => "2qerrw"
    ]
]);
echo $res;
exit;